class PeopleController < ApplicationController
  def index
    _people = Person.where("answers.answer_id = answers.correct_answer and people.answers_count = 10").joins(:answers).group("people.id").count
    
    @people = Person.where(["id IN (?)", _people.select{|k,v| v==10}.map{|p| p[0]}]).order("id DESC")
    respond_with(@people)
  end
end
